#ifndef DEFS_H
#define DEFS_H

#include <boost/preprocessor/seq/enum.hpp>
#include <boost/preprocessor/repetition/repeat.hpp>
#include <boost/any.hpp>
#include <boost/shared_ptr.hpp>
#include "jncTemplates.h"
#include "jncException.h"
#include <vector>
#include <list>

// Various type redefinitions used throughout app

#define UNSET          -1

typedef enum { INCOMPLETE = 0, COMPLETE = 1 }     RunState;

typedef std::list<std::vector<std::string> >     SigTokens;

typedef std::size_t               Idnb;

typedef enum { NORMAL, LOW, VLOW, XLOW }     Priority;

typedef enum {
  BOOST_PP_SEQ_ELEM(0, ENUM) = 0,
  BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_POP_FRONT(ENUM)),
  JVOID
} jncTypei;

typedef boost::any          gReturnCode;

typedef gReturnCode          jncTypev;

typedef void*             gnCallback;

/* jncTypev convTable(jncTypei, gReturnCode); */

typedef std::pair<jncTypei, char*>     ParamType;

/* TODO: Should not be here !!! */
class CallBackParam {
 public:
  CallBackParam(void* hdl, const std::vector<jncTypev>& argn) : handle(hdl), argv(argn) {}
    unsigned int getArgSize()
    { return argv.size(); }
    void setHandle(void* ev)
    { handle = ev;}
    void* getHandle()
      { return handle;}
    std::vector<jncTypev> argv; // will be easier on the JNCIMPLINTERFACE macro
 private:
    void* handle;
};

#endif
